package cn.com.yusys.yusp.message.domain;

import cn.com.yusys.yusp.commons.mapper.domain.BaseDomain;
import java.io.Serializable;
import javax.persistence.*;

@Table(name = "MESSAGE_TYPE")
public class MessageType extends BaseDomain implements Serializable {
    @Id
    @Column(name = "MESSAGE_TYPE")
    private String messageType;

    @Column(name = "MESSAGE_DESC")
    private String messageDesc;

    @Column(name = "MESSAGE_LEVEL")
    private String messageLevel;

    @Column(name = "TEMPLATE_TYPE")
    private String templateType;

    private static final long serialVersionUID = 1L;

    /**
     * @return MESSAGE_TYPE
     */
    public String getMessageType() {
        return messageType;
    }

    /**
     * @param messageType
     */
    public void setMessageType(String messageType) {
        this.messageType = messageType == null ? null : messageType.trim();
    }

    /**
     * @return MESSAGE_DESC
     */
    public String getMessageDesc() {
        return messageDesc;
    }

    /**
     * @param messageDesc
     */
    public void setMessageDesc(String messageDesc) {
        this.messageDesc = messageDesc == null ? null : messageDesc.trim();
    }

    /**
     * @return MESSAGE_LEVEL
     */
    public String getMessageLevel() {
        return messageLevel;
    }

    /**
     * @param messageLevel
     */
    public void setMessageLevel(String messageLevel) {
        this.messageLevel = messageLevel == null ? null : messageLevel.trim();
    }

    /**
     * @return TEMPLATE_TYPE
     */
    public String getTemplateType() {
        return templateType;
    }

    /**
     * @param templateType
     */
    public void setTemplateType(String templateType) {
        this.templateType = templateType == null ? null : templateType.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageType other = (MessageType) that;
        return (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
            && (this.getMessageDesc() == null ? other.getMessageDesc() == null : this.getMessageDesc().equals(other.getMessageDesc()))
            && (this.getMessageLevel() == null ? other.getMessageLevel() == null : this.getMessageLevel().equals(other.getMessageLevel()))
            && (this.getTemplateType() == null ? other.getTemplateType() == null : this.getTemplateType().equals(other.getTemplateType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
        result = prime * result + ((getMessageDesc() == null) ? 0 : getMessageDesc().hashCode());
        result = prime * result + ((getMessageLevel() == null) ? 0 : getMessageLevel().hashCode());
        result = prime * result + ((getTemplateType() == null) ? 0 : getTemplateType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", messageType=").append(messageType);
        sb.append(", messageDesc=").append(messageDesc);
        sb.append(", messageLevel=").append(messageLevel);
        sb.append(", templateType=").append(templateType);
        sb.append("]");
        return sb.toString();
    }
}